﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BlackHtml5.WebSite.Web.Default.Article
{
    public class NewsAction  : Controller
	{
		public NewsAction(System.IO.TextWriter tw):base(tw){}
		public NewsAction(string fileName) : base(fileName) {}
		public NewsAction(HttpContext context):base(context){}
		public NewsAction(Microsoft.Owin.IOwinContext context):base(context){}
        
        public void News()
        {
            var con = new System.Data.SQLite.SQLiteConnection(NFinal.Config.ConfigurationManager.ConnectionStrings["Common"].ConnectionString);
			con.Open();
            Dictionary<string, string> global = GetGlobal(con);
            con.Close();
            
			Write("\r\n\r\n\r\n\r\n<!DOCTYPE html>\r\n<html lang=\"zh-cn\">\r\n<head>\r\n\t<meta charset=\"UTF-8\" />\r\n\t<title>");
			Write(global["title"]);
			Write("_");
			Write(global["cfg_webname"]);
			Write("</title>\r\n    <meta name=\"keywords\" content=\"");
			Write(global["keywords"]);
			Write("\" />\r\n    <meta name=\"description\" content=\"");
			Write(global["description"]);
			Write("\" />\r\n    <meta name=\"viewport\" content=\"width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no\" />\r\n    <meta name=\"copyright\" content=\"Copyright dedecms51.com 版权所有\" />\r\n    \r\n    <link href=\"/WebSite/Content/BlackHtml5/css/bootstrap.min.css\" rel=\"stylesheet\" />\r\n    <link href=\"/WebSite/Content/BlackHtml5/css/inner.min.css\" rel=\"stylesheet\" />\r\n    <!--[if lt IE 9]>\r\n    <script src=\"/WebSite/Content/BlackHtml5/js/html5shiv.min.js\"></script>\r\n    <![endif]-->\r\n    <script src=\"/WebSite/Content/BlackHtml5/js/jquery.min.js\"></script>\r\n    <script src=\"/WebSite/Content/BlackHtml5/js/bootstrap.min.js\"></script>\r\n    <script src=\"/WebSite/Content/BlackHtml5/js/inner.min.js\"></script>\r\n</head>\r\n\r\n<body>\r\n    ﻿");
			Write("\r\n<header>\r\n    <div class=\"box\">\r\n\t    <a href=\"/\" title=\"织梦网站建设与制作\"><img src=\"/WebSite/Content/BlackHtml5/images/logo_cases.png\" alt=\"织梦设计出品\" /></a>\r\n        <div class=\"wechat\">\r\n    \t    <img src=\"/WebSite/Content/BlackHtml5/images/wechat_code.jpg\" alt=\"扫描关注网站建设微信公众账号\" class=\"wechat\" /><p>扫一扫微信二维码<i></i></p>\r\n        </div>\r\n        <nav>\r\n          <ul>\r\n            <li><a href=\"/\">织梦首页</a></li>\r\n            {dede:channel type=\'top\' currentstyle=\"<li class=\'active\'><a href=\'~typelink~\' style=\'color:white;\'>~typename~</a></li> \"}\r\n            <li><a href=\"[field:typeurl/]\">[field:typename/]</a></li>\r\n            {/dede:channel}\r\n          </ul>\r\n        </nav>\r\n    </div>\r\n    <footer>\r\n\t    高端定制，品牌设计<br /><u>2008 - 2015</u>作品集<br /><a href=\"http://www.dedecms51.com/\" target=\"_blank\">郑州网站建设与制作公司</a>\r\n    </footer>\r\n</header>\r\n    <section class=\"toolbar\">\r\n    \t<a href=\"/\" title=\"返回首页\" class=\"homelink\"><span class=\"glyphicon glyphicon-chevron-left\"></span></a>\r\n    \t<span class=\"switch glyphicon glyphicon-th-list\"></span>\r\n        <div class=\"btnList\">\r\n            <div class=\"link btn-group\">\r\n        \t    <a href=\"{dede:type typeid=\'0\' row=1}[field:typelink function=\'str_replace(\"/index.html\",\"\",@me)\' /]{/dede:type}\" class=\"btn btn-default\">文章列表</a>\r\n            </div>\r\n            <div class=\"link btn-group\">\r\n        \t    <a href=\"{dede:prenext get=\'preurl\'/}\" class=\"btn btn-default\"><span class=\"glyphicon glyphicon-arrow-left\"></span>PREV</a>\r\n            </div>\r\n            <div class=\"link btn-group\">\r\n        \t    <a href=\"{dede:prenext get=\'nexturl\'/}\" class=\"btn btn-default\">NEXT<span class=\"glyphicon glyphicon-arrow-right\"></span></a>\r\n            </div>\r\n        </div>\r\n    </section>\r\n    \r\n    <section class=\"artshow content\">\r\n        <div class=\"box\">\r\n        \t<h1>{dede:field.title/}</h1>\r\n            <span class=\"rel\">\r\n            \t织梦科技<u>•</u>{dede:field.pubdate function=\"MyDate(\'Y-m-d\',@me)\"/}<u>•</u><a href=\"{dede:type typeid=\'0\' row=1}[field:typelink function=\'str_replace(\"/index.html\",\"\",@me)\' /]{/dede:type}\" target=\"_blank\">{dede:field name=\'typename\'/}</a><u>•</u><span class=\"glyphicon glyphicon-eye-open\" title=\"浏览次数\"></span> <script src=\"{dede:field name=\'phpurl\'/}/count.php?view=yes&aid={dede:field name=\'id\'/}&mid={dede:field name=\'mid\'/}\" type=\'text/javascript\' language=\"javascript\"></script>\r\n            </span>\r\n            <div class=\"words\">\r\n                {dede:field.body/} \r\n            </div>\r\n            <dl class=\"tags\">\r\n              <dt>文章关键词<span class=\"glyphicon glyphicon-tag\"></span></dt>\r\n              {dede:tag getall=\'0\'}\r\n              <dd><a href=\"[field:link/]\" target=\"_blank\">[field:tag /]</a></dd>\r\n              {/dede:tag}\r\n            </dl>\r\n            <div class=\"bdsharebuttonbox\">\r\n            \t<a href=\"#\" class=\"bds_more\" data-cmd=\"more\"></a><a href=\"#\" class=\"bds_qzone\" data-cmd=\"qzone\" title=\"分享到QQ空间\"></a><a href=\"#\" class=\"bds_tsina\" data-cmd=\"tsina\" title=\"分享到新浪微博\"></a><a href=\"#\" class=\"bds_weixin\" data-cmd=\"weixin\" title=\"分享到微信\"></a><a href=\"#\" class=\"bds_tqq\" data-cmd=\"tqq\" title=\"分享到腾讯微博\"></a><a href=\"#\" class=\"bds_renren\" data-cmd=\"renren\" title=\"分享到人人网\"></a>\r\n            </div>\r\n        </div>\r\n        <aside>\r\n        \t<div class=\"ad\"><a href=\"/\" title=\"做网站，找织梦\" target=\"_blank\"><img src=\"{dede:global.cfg_templeturl/}/Picture/ad.jpg\" alt=\"建网站，找织梦，网站建设品牌设计企业\" /></a></div>\r\n            <div class=\"caption\"><h3>推荐阅读</h3></div>\r\n            <ul class=\"items\">\r\n               {dede:arclist row=\'4\' titlelen=\'30\' typeid=\'top\'} \r\n                <li>\r\n                  <a href=\"[field:arcurl/]\" target=\"_blank\" class=\"thumb\"><img src=\"[field:litpic/]\" /></a>\r\n                  <span class=\"title\"><a href=\"[field:arcurl/]\" target=\"_blank\" title=\"[field:title/]\">[field:title/] ...</a></span>\r\n                  <span class=\"rel\">[field:pubdate runphp=\'yes\'] $today = Floor(time()/(3600 * 24)); $senday= Floor(@me/(3600 * 24)); $updays = $today-$senday; if($updays==0) @me = \"今日\"; else @me = $updays.\"天前\"; [/field:pubdate]<span class=\"glyphicon glyphicon-eye-open\" title=\"浏览次数\"></span>[field:click/]</span>\r\n                </li>\r\n                {/dede:arclist}\r\n            </ul>\r\n        </aside>\r\n    </section>\r\n");
			Write("\r\n<div class=\"dock\">\r\n    <ul class=\"icons\">\r\n        <li class=\"up\"><i></i></li>\r\n        <li class=\"tel\">\r\n            <i></i><p>建站咨询热线<br />{dede:global.tell/}</p>\r\n        </li>\r\n        <li class=\"im\">\r\n            <i></i><p><a href=\"http://wpa.qq.com/msgrd?v=3&uin={dede:global.qq/}&site=qq&menu=yes\" target=\"_blank\">点我，建站咨询</a></p>\r\n        </li>\r\n        <li class=\"wechat\">\r\n            <i></i><p><img src=\"/WebSite/Content/BlackHtml5/images/wechat_code.jpg\" alt=\"扫描关注网站建设微信公众账号\" /></p>\r\n        </li>\r\n        <li class=\"down\"><i></i></li>\r\n    </ul>\r\n    <a class=\"switch\"></a>\r\n</div>\r\n    \r\n<script>\r\n    var _hmt = _hmt || [];\r\n    (function() {\r\n        var hm = document.createElement(\"script\");\r\n        hm.src = \"//hm.baidu.com/hm.js?a821a161aa4214f5ff5b8ca372960ebb\";\r\n        var s = document.getElementsByTagName(\"script\")[0];\r\n        s.parentNode.insertBefore(hm, s);\r\n    })();\r\n</script>\r\n</body>\r\n</html>");
        }
    }
}